home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / qmac215.zip / BIGFIND.QM next >
Text File  |  1990-06-27  |  3KB  |  65 lines

  1. *
  2. * FILE:  BIGFIND.QM  --   "Big Find":  Find all instances of a given
  3. *                         string, and let the user select one and hit
  4. *                         return.  Uses DOS's FIND, or other search utility.
  5. * Author:   Tim Farley
  6. * Written:  8/21/89
  7. * Revised:  9/6/89    (Separate macro for each find utility).
  8. *
  9. * (1) Pick one of the three macros below, based on which search program you
  10. *     use.  Delete the other two.
  11. *
  12. *       ^f5  MS/PC-DOS's own FIND command
  13. *       ^f6  Chris Dunford's FGREP, available free on BBS's
  14. *       ^f7  Borland's Turbo GREP (comes with Turbo Pascal, Assembler and C)
  15. *            or Microsoft's MEGREP (comes with Microsoft language products)
  16. *
  17. * (2) Use QMAC to convert this file to a QEdit binary macro:
  18. *
  19. *       QMAC BIGFIND.MAC BIGFIND.QM B N
  20. *
  21. * (3) Then load BIGFIND.MAC into QEdit (using MacroRead or /L) to use this.
  22.  
  23. * Control-F5 uses DOS's FIND command.  Its output looks like this:
  24. *
  25. * ---------- D:\PATH\FILENAME.EXT
  26. * [xx]actual line of text
  27. *
  28. ^f5  MacroBegin UnMarkBlock DropAnchor                                       &
  29.      EditFile 'FIND.OUT' Return KillFile Quit GotoBlockBeg UnMarkBlock       &
  30.      Dos 'FIND /N "' Pause '" >FIND.OUT ' CurrentFilename Return Return      &
  31.      EditFile Return Pause BegLine CursorRight                               &
  32.      MarkWord Copy Quit GotoLine Paste Return MakeCtrOfScreen
  33.  
  34. * Control-F6 uses Chris Dunford's FGREP.  Its output looks like this:
  35. *
  36. * **File d:\path\FILENAME.EXT
  37. *     xx: actual line of text
  38. *
  39. * (Chris Dunford's FGREP is available for free, including from
  40. *  SemWare's BBS at (404) 641-8968.  Look for FGREP170.ZIP.).
  41. *
  42. ^f6  MacroBegin UnMarkBlock DropAnchor                                       &
  43.      EditFile 'FIND.OUT' Return KillFile Quit GotoBlockBeg UnMarkBlock       &
  44.      Dos 'fgrep -l "' Pause '" >FIND.OUT ' CurrentFilename Return Return     &
  45.      EditFile Return Pause BegLine WordRight                                 &
  46.      MarkWord Copy Quit GotoLine Paste Return MakeCtrOfScreen
  47.  
  48. * Control-F7 uses Borland Turbo GREP, or any search utility that
  49. *    produces "Unix style" output, which looks like this:
  50. *
  51. * D:\PATH\FILENAME.EXT   xx      actual line of text
  52. *
  53. * For Microsoft's MEGREP, replace 'grep -o+n+r- "' below with 'megrep "'.
  54. * If you use another grep, you may need different command line switches.
  55. *
  56. ^f7  MacroBegin UnMarkBlock DropAnchor                                       &
  57.      EditFile 'FIND.OUT' Return KillFile Quit GotoBlockBeg UnMarkBlock       &
  58.      Dos 'grep -o+n+r- "' Pause '" >FIND.OUT ' CurrentFilename Return Return &
  59.      EditFile Return Pause                                                   &
  60.      BegLine Find ' ' Return 'I' Return WordRight                            &
  61.      MarkWord Copy Quit GotoLine Paste Return MakeCtrOfScreen
  62.  
  63. *
  64. * EOF: BIGFIND.QM
  65.